﻿<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <RepoRoot>$([System.IO.Path]::GetDirectoryName($([MSBuild]::GetPathOfFileAbove('.gitignore', '$(MSBuildThisFileDirectory)'))))</RepoRoot>
    <UserSecretsId>d733072a-9c0f-473c-a99b-6e12f7b5ef28</UserSecretsId>
  </PropertyGroup>

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <RootNamespace>skchatgptazurefunction</RootNamespace>
    <AzureFunctionsVersion>v4</AzureFunctionsVersion>
    <_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
    <OutputType>Exe</OutputType>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
    <IsPackable>false</IsPackable>
  </PropertyGroup>

  <PropertyGroup>
      <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
      <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>    
  </PropertyGroup>
  
  <ItemGroup>
    <PackageReference Include="Microsoft.Azure.Functions.Worker" />
    <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.OpenApi" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\..\..\..\..\src\Connectors\Connectors.OpenAI\Connectors.OpenAI.csproj" />
    <ProjectReference Include="..\kernel-functions-generator\kernel-functions-generator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
  </ItemGroup>

  <ItemGroup>
    <None Include="$(IntDir).generated\kernel-functions-generator\kernel-functions-generator.SemanticSkillGenerator\**">
      <Link>.generated\%(RecursiveDir)%(Filename)%(Extension)</Link>
    </None>
    <None Include="shared\PluginShared.csproj" />
  </ItemGroup>

  <ItemGroup>
     <None Update="host.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="local.settings.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <CopyToPublishDirectory>Never</CopyToPublishDirectory>
    </None>
    <None Update="appsettings.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <AdditionalFiles Include="Prompts\**">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </AdditionalFiles>
  </ItemGroup>

    <ItemGroup>
    <Content Include="logo.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
  </ItemGroup>

  <ItemGroup>
    <Using Include="System.Threading.ExecutionContext" Alias="ExecutionContext" />
  </ItemGroup>
</Project>
